package behavioral.observer.inJava;

import java.util.Observable;

/**
 * 主题
 *
 */
public class Button extends Observable {

    private int x;
    private int y;

    public void click() {
        Event click = new Event("click");
        setChanged();
        notifyObservers(click);
    }

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }


    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }

}
